Digital image processing method and device for lightening said image

ABSTRACT

A method of processing a digital image, said image comprising a plurality of pixels, the method comprising a computation step (S 1 ) wherein a histogram of the distribution of the number of pixels of the image as a function of their luminance is computed, a step (S 2 ) for lightening the image based on said histogram comprising a subdivision (S 20 ) of the pixels of the image into a first set of pixels having luminance values between a low threshold and a high threshold and into a second set of pixels having luminance values greater than said high threshold, a first luminance processing operation (S 21 ) on the pixels of the first set of pixels and a second luminance processing operation (S 22 ) on the pixels of the second set of pixels, the two luminance processing operations (S 21 , S 22 ) being different, the first processing operation (S 21 ) comprising an increase in the luminance of the pixels of the image.

The invention relates to the processing of a digital image and moreparticularly to the lightening of a digital image and the lightening ofa digital video.

When digital images, or digital videos, are captured using appliancessuch as, for example, digital cameras, the latter can include dark areasthat can conceal certain original details, and it is then said thatthese areas of the image are underexposed. These images, or videos, canalso be captured with backlighting, that is to say that the capturedimages include a very dark area and a very light area.

Currently, there are methods for revealing concealed details of the darkand/or light areas in a digital image that are based on a modificationof the global brightness of the image. However, these processingoperations rely on an average measurement of the brightness of the imagethat does not take into account local contrasts in the image. Theseprocessing operations therefore lead to a loss of overall contrast ofthe image and also a loss of detail in the very light or very dark areasof the image.

Other methods use a multiplying gain computed as a function of thebrightness of the pixel, the same gain being applied to all the pixelswith the same brightness in the image. However, these methods often leadto a “whiteout” phenomenon in the image, that is to say a loss ofoverall and local contrast of the image. In practice, this whiteoutphenomenon appears upon a redistribution of the values of the pixels,either toward a higher portion of the available dynamic range of theimage in the case of lightening, or toward a lower portion in the caseof darkening. Moreover, this redistribution, or compression of theimage, of the values of the pixels in the light or dark areas canintroduce a loss of resolution, and therefore a loss of useful detail inthese areas.

It is possible to cite, for example, the use of a physical flash thatincreases the general brightness of the scene and therefore the entireimage. This physical flash can have the effect of saturating the lightareas of the image leading to a loss of detail and contrast.

It is also possible to overexpose the image when it is captured, forexample by increasing the exposure time and by keeping the otherexposure parameters fixed, so as to make the dark portions of the scenevisible, but the light portions of the scene are then saturated.

Conversely, by underexposing the image when it is captured, for example,by reducing the exposure time, the light areas of the scene arepreserved, but this method generates a spurious noise in the dark areasthat will also be amplified in the subsequent image processingoperations.

There are also methods that optimize both the rendering of the dark andlight portions of the scene which entail capturing a number of digitalimages with different exposure times to obtain sufficient information inorder to reveal the hidden details by merging, but these processingoperations are complex and costly.

In conclusion, all these methods have the drawback of modifying thebrightness of the pixels by reducing the local contrast of the image,that is to say a dark pixel will be lightened in the same mannerindependently of whether it is situated in a dark area or in a lightarea. The lightening of a dark pixel in a light area in fact directlyreduces the contrast of the area.

Furthermore, when a video is to be lightened, an inappropriateprocessing operation on the different images of the video can lead to anoverall or local variation of the colours and of the lightening from oneimage to the next and therefore an instability over time in the contentof the video.

According to one implementation and embodiment, there is proposed amethod and a device for lightening an image and a digital video whilepreserving the contrast of the image and of the video, in particular inthe light areas of the image.

According to another implementation and embodiment, it is proposed tolighten an image and a digital video while preserving the colours of theimage and of the video.

Furthermore, it is also proposed to be able to lighten an image and avideo captured by a camera or stored in a computer when they are edited.It is also proposed to perform this lightening processing operationbefore capture, for example, during the image preview mode offered bycurrent digital cameras. It is also proposed to be able to lighten animage and a video at the time of their capture by a camera, before theirstorage, for example, within the camera.

According to one aspect, there is proposed a method of processing adigital image, said image comprising a plurality of pixels, the methodcomprising a computation step wherein a histogram of the distribution ofthe number of pixels of the image as a function of their luminance iscomputed.

This method also comprises a step for lightening the image based on saidhistogram comprising a subdivision of the pixels of the image into afirst set of pixels having luminance values between a low threshold anda high threshold and into a second set of pixels having luminance valuesgreater than said high threshold, a first luminance processing operationon the pixels of the first set of pixels and a second luminanceprocessing operation on the pixels of the second set of pixels, the twoluminance processing operations being different, the first processingoperation comprising an increase in the luminance of the pixels of theimage.

In other words, unlike in the state of the art where an identicalprocessing operation is applied to all the pixels of an image, in thiscase two different processing operations are applied to two distinctsets of pixels. A first processing operation is applied to increase theluminance of a first set of dark pixels, in order to obtain the effectof a traditional flash, and a second processing operation is applied toredistribute all the values of the less dark pixels over the dynamicrange of the second set of pixels in order, notably, to preserve thecontrast of the image and avoid the “whiteout” phenomenon in the lightareas of the image. This difference in processing operation makes itpossible, among other things, to preserve the contrast of the lightareas of the image.

There is thus provided a simple and inexpensive method for lighteningthe dark areas of a digital image while preserving the details and thecontrast in the light areas of the image. This simple method makes itpossible to save on processing steps because it requires only a singleimage. Furthermore, this method can be easily integrated into a digitalcamera that offers limited memory storage, energy storage andcomputation capabilities, such as, for example, a camera incorporated ina mobile telephony appliance. This method can also be integrated in anappliance including image processing facilities, such as a computer, forexample.

According to one implementation, the first luminance processingoperation comprises a gamma-type transfer function processing operationhaving an adaptable gamma parameter applied to the first set of pixels.

With a gamma-type transfer function, it is possible to sufficientlyincrease the luminance of the dark areas of the image.

According to another implementation, the second luminance processingoperation comprises an equalization, preferably smoothed, of thehistogram applied to the second set of pixels.

This makes it possible to preserve the contrast in the less dark areasof the image. Furthermore, this makes it possible to improve thevisibility of the dark content of strongly-contrasted images, that isimages that have a very dark area and a very light area.

Advantageously, the pixels of the second set have luminance valuesbetween the high threshold and a maximum threshold, and the computationstep comprises a computation of an initial histogram, a determination ofa luminance range above and below which the values of the initialhistogram are nil, and a redistribution of the number of pixels of theluminance range in the range between said low threshold and said maximumthreshold so as to compute said histogram.

It is thus possible to extend the initial histogram over the entireavailable dynamic range of the image.

According to another implementation, the computation step furthercomprises a determination of a first area between the bottom limit ofthe luminance range and an initial threshold and a determination of asecond area between said initial threshold and the top limit of theluminance range, a first redistribution of the number of pixels of thefirst area in the range between said low threshold and said highthreshold, and a second redistribution of the number of pixels of thesecond area in the range between said high threshold and said maximumthreshold so as to compute said histogram.

Using the identification of two luminance areas, a very dark area and aless dark area, it is possible to extend, via the first redistribution,the very dark area of the histogram more significantly than theextension of the second, less dark area.

According to yet another implementation, the method further comprises astep for enhancement of some of the colours of the image comprising anamplification of the chrominance of each pixel of the image according toa ratio between the lightened luminance and the original luminance ofsaid pixel of the image.

It is thus possible to enhance the colour of the images.

According to another implementation, the method is applied to theprocessing of a plurality of successive digital images of a videosequence, wherein a processing operation on each digital image isperformed, said high threshold having a constant value for eachprocessing operation on said successive digital images.

It is thus possible to provide a method for stabilizing over time thecolours of a video sequence when the luminance of the images of thesequence is modified. Moreover, there is offered a possibility ofdisplaying, in the preview mode, lightened images before capturing ornot capturing an image.

The captured image can also be processed using image processing softwareembedded in the image capturing camera or in a computer.

According to another aspect, there is proposed a device for processing adigital image, said image comprising a plurality of pixels, the devicecomprising a computation means for computing a histogram of thedistribution of the number of pixels of the image as a function of theirluminance.

This device comprises a lightening means for lightening the image basedon said histogram, said lightening means comprising a subdivision meansfor subdividing the pixels of the image into a first set of pixelshaving luminance values between a low threshold and a high threshold andinto a second set of pixels having luminance values greater than saidhigh threshold, a first luminance processing means for performing afirst luminance processing operation on the pixels of the first set ofpixels and a second luminance processing means for performing a secondluminance processing operation on the pixels of the second set ofpixels, the two luminance processing operations being different, thefirst processing operation comprising an increase in the luminance ofthe pixels of the image.

According to one embodiment, the first luminance processing means isconfigured to perform a gamma-type transfer function processingoperation having an adaptable gamma parameter applied to the first setof pixels.

According to another embodiment, the second luminance processing meansis configured to perform an equalization, preferably smoothed, of thehistogram applied to the second set of pixels.

Advantageously, the pixels of the second set have luminance valuesbetween the high threshold and a maximum threshold, and said computationmeans is able to compute an initial histogram, to determine a luminancerange above and below which the values of the initial histogram are nil,and to redistribute the number of pixels of the luminance range in therange between said low threshold and said maximum threshold so as tocompute said histogram.

According to another embodiment, said computation means is able todetermine a first area between the bottom limit of the luminance rangeand an initial threshold, a second area between said initial thresholdand the top limit of the luminance range, and to redistribute the numberof pixels of the first area in the range between said low threshold andsaid high threshold, and the number of pixels of the second area in therange between said high threshold and said maximum threshold so as tocompute said histogram.

According to yet another embodiment, the device comprises a means ofenhancing some of the colours of the image to amplify the chrominance ofeach pixel of the image according to a ratio between the lightenedluminance and the original luminance of said pixel of the image.

According to another embodiment, the device is able to process aplurality of successive digital images of a video sequence, and saidlightening means is able to lighten each successive digital image with ahigh threshold having a constant value.

According to another aspect, there is also proposed a wirelesscommunication appliance comprising a digital image processing device asdefined hereinabove.

Other benefits and characteristics will become apparent from studyingthe detailed description of implementations and embodiments of theinvention that are by no means limiting and the appended drawings inwhich:

FIG. 1 diagrammatically illustrates the main phases of an implementationof a digital image processing method;

FIG. 2 diagrammatically illustrates an implementation of the imagelightening step;

FIG. 3 diagrammatically illustrates an exemplary implementation of aprocessing method applied to a particular image;

FIG. 4 diagrammatically illustrates another implementation of thedigital image processing method;

FIG. 5 diagrammatically illustrates yet another implementation of thedigital image processing method;

FIG. 6 diagrammatically illustrates an embodiment of a device forprocessing one or more digital images; and

FIG. 7 diagrammatically illustrates an embodiment of a wirelesscommunication appliance comprising a device for processing one or moredigital images.

FIG. 1 diagrammatically shows the main phases of an implementation of adigital image processing method.

The digital image comprises a plurality of pixels.

There are a number of digital image formats: the “RGB” or “Red, Greenand Blue” format, the “YUV” or “Luminance, Blue Chrominance and RedChrominance” format, the “Lab” or “Clarity, Range of red-green axis andRange of yellow-blue axis” format, the “TSV” or “Hue, Saturation andValue” format, and so on.

All these formats have the common feature of defining each pixel of thedigital image using three components that define a colour space.

The processing method is performed on the basis of digital images in the“YUV” format. In the case of an image that has a different format, thelatter will be previously converted to the “YUV” format.

This processing method comprises a computation step S1 and a step S2 forlightening the image.

In the computation step S1, a histogram H(Y) of the distribution of thenumber of pixels of the image as a function of their luminance iscomputed. Y will be used to denote the luminance of a pixel of theimage.

Advantageously, a sampled histogram of the image can be computed, thatis to say, a histogram over a determined sample of pixels of the imageis computed according to a sampling pitch Na. Thus, the number of pixelscovered in the image is reduced in order to limit the number ofcomputations and the number of memory access cycles. It is also possibleto perform, before the computation step S1, a step for reducing theresolution of the digital image.

The step S2 for lightening the image comprises a subdivision S20 of thepixels of the image, a first luminance processing operation S21 and asecond luminance processing operation S22. This lightening step S2 willbe described with the next FIG. 2.

FIG. 2 diagrammatically shows an implementation of the step S2 forlightening the image.

It will be noted that the luminance dynamic range of an image iscontained in a range Dy=[DyMin;DyMax].

In the step for subdividing the pixels of the image S20, the histogramH(Y), sampled or not, is used as a basis to determine a first set ofpixels E1 having luminance values between a low threshold binMinOut anda high threshold binMidOut and a second set of pixels E2 havingluminance values between said high threshold binMidOut and a maximumthreshold binMaxOut. The range [binMinOut; binMaxOut] is thereforeincluded within the luminance dynamic range of the image Dy.

For a photo, that is to say an individual digital image, coded on eightbits, the luminance dynamic range of the image will be contained withinthe range Dy=[0; 255]. In this case, the minimum value of the luminancedynamic range of the image DyMin is equal to 0 and the maximum value ofthe luminance dynamic range of the image DyMax is equal to 255. For avideo coded on eight bits, the luminance dynamic range of a digitalimage of the video will be contained within the range Dy=[16; 235]. Inthis case, DyMin=16 and DyMax=235.

The low threshold binMinOut is greater than or equal to the minimumvalue of the luminance dynamic range of the image DyMin.

The maximum threshold binMaxOut is less than or equal to the maximumvalue of the luminance dynamic range of the image DyMax.

The high threshold binMidOut is a threshold below which it is consideredthat the image is very dark. This high threshold binMidOut can varyaccording to the luminance dynamic range of the image, the values of thehistogram of the image, and the redistribution factor for the values ofthe pixels of the first and second sets. This high threshold binMidOutbecomes all the greater as the luminance dynamic range of the imagebecomes smaller and it can be all the greater when the histogramincludes a large segment of nil values. The high threshold binMidOut cantypically take values in the range [10; 120]εDy.

FIG. 2 also represents an exemplary curve B(Y) of the luminanceprocessing operations that correspond to the lightening step S2, andthat are applied to all the pixels of the image, that is to say to thepixels that have a luminance within the range [binMinOut; binMaxOut]εDy.

The luminance processing operation B(Y) is a global processing operationrepresented by a transfer function applied to all the pixels of theimage. This transfer function B(Y) corresponds to the first and secondluminance processing operations S21, S22. It will be noted that thetransfer function B(Y) differs from a simple conventional gamma transferfunction T_(c)(Y) that would be applied to all the pixels of the image,that is to say, to the range Dy. Furthermore, this transfer functionB(Y) differs from a simple conventional equalization transfer functionE_(c)(Y), for equalizing the histogram H(Y) of the image, that would beapplied to all the pixels of the image.

This transfer function B(Y) corresponds therefore to a global luminanceprocessing operation including two different luminance processingoperations S21, S22 applied to the two sets of pixels E1, E2, and not toone and the same processing operation applied to both sets of pixels.

Generally, in the first luminance processing operation S21, theluminance of the pixels of the first set of pixels E1 is increased and,in the second luminance processing operation S22, a different luminanceprocessing operation is applied to the pixels of the second set ofpixels E2.

In the first luminance processing operation S21, it is possible, forexample, to apply a gamma-type transfer function T_(t)(Y) to the valuesof the pixels of the first set of pixels E1, that is to say to thevalues contained in the range [binMinOut; binMidOut]. This gamma-typetransfer function T_(t)(Y) corresponds to a modified gamma transferfunction T_(m)(Y) which is preferentially translated so as to apply saidmodified gamma transfer function T_(m)(Y) from a cut-off threshold SC,that is to say for pixel luminances contained in the range [SC;binMidOut], where the cut-off threshold SC is between the low thresholdbinMinOut and the high threshold binMidOut. The gamma-type transferfunction T_(t)(Y) has an adaptable gamma parameter γ. This gamma-typetransfer function T_(t)(Y) depends on the luminance dynamic range Dy ofthe image, and the increase in luminance of the pixels depends on thegamma parameter γ.

Furthermore, this gamma-type transfer function T_(t)(Y) depends on thetype of screen used to display the images, notably the contrastproperties of such screens.

Generally, the value of the gamma parameter γ is contained in the range[0.4; 0.7].

For screens that have a good contrast, for example, the latestgenerations of liquid crystal display LCD screens of mobile telephones,or CRT, “Cathode Ray Tube”, screens, the gamma parameter γ is,preferably, equal to 0.55.

For screens that have less good contrast, the gamma parameter γ is,preferably, equal to 0.65.

The conventional gamma transfer function T_(c)(Y), for a photo or videocoded on eight bits, is expressed by the following equation (1):

$\begin{matrix}{Y^{\prime} = {{T_{c}(Y)} = {255 \cdot \left( \frac{Y}{255} \right)^{\gamma}}}} & {{equation}\mspace{14mu}(1)}\end{matrix}$

-   -   Y: the luminance of a pixel of the original image;    -   Y′: the luminance of said pixel after processing;    -   T_(c)(Y): the conventional gamma transfer function; and    -   γ: adaptable gamma parameter.

FIG. 2 also shows an example of a conventional gamma transfer functionT_(c)(Y), with the parameter γ=0.55.

For a photo or a video coded on eight bits, the modified gamma transferfunction T_(m)(Y) is expressed, for example, by the following equation(2):

$\begin{matrix}{Y^{\prime} = {{T_{m}(Y)} = {{\left( \frac{{{Dy}\;{Max}} - Y}{{{Dy}\;{Max}} - {{Dy}\;{Min}}} \right) \cdot \left( {\frac{\left( {Y - {{Dy}\;{Min}}} \right)^{\gamma}}{\left( {{{Dy}\;{Max}} - {{Dy}\;{Min}}} \right)^{\gamma - 1}} + {{Dy}\;{Min}}} \right)} + {{\quad\quad}\frac{Y \cdot \left( {Y - {{Dy}\;{Min}}} \right)}{{{Dy}\;{Max}} - {{Dy}\;{Min}}}}}}} & {{equation}\mspace{14mu}(2)}\end{matrix}$

-   -   Y: the luminance of a pixel of the images of the original video;    -   Y′: the luminance of said pixels after processing;    -   DyMin: the minimum of the luminance dynamic range of the image;    -   DyMax: the maximum of the luminance dynamic range of the image;    -   T_(m)(Y): the modified gamma transfer function; and    -   γ: adaptable gamma parameter.

This FIG. 2 also shows an example of a modified gamma transfer functionT_(m)(Y), with the parameter γ=0.45. Also shown in FIG. 2 is theidentity function Id which has the equation: Y′=Y.

The second luminance processing operation S22 is a luminance processingoperation on the pixels of the second set of pixels E2 which isdifferent from the first luminance processing operation S21 applied tothe first set of pixels E1.

This second processing operation S22 can be, for example, a linearfunction to redistribute the luminance of the pixels over the remainingdynamic range of the image, that is to say over the second set of pixelsE2.

This second processing operation can also be a conventional equalizationtransfer function E_(c)(Y) for equalizing the histogram H(Y) applied tothe pixels of the second set of pixels E2, or better, a smoothedequalization transfer function E_(L)(Y). This smoothed equalizationtransfer function E_(L)(Y) makes it possible to differentiate theincrease in luminance of the pixels so as to preserve the contrast ofthe photos after equalization.

The principle of conventional non-smoothed equalization of a histogramis to redistribute the luminances of the pixels uniformly. Anequalization, whether smoothed or not, can be performed on the basis ofan aggregate histogram Hc(Y) of the image according to the followingequation (3):

$\begin{matrix}{{{Hc}(Y)} = {\sum\limits_{u = {DyMin}}^{Y}{H(u)}}} & {{equation}\mspace{14mu}(3)}\end{matrix}$

The smoothed equalization transfer function E_(L)(Y) for equalizing andsmoothing the histogram H(Y) may be determined from the global smoothedequalization transfer function E_(G)(Y) which has the equation (4):

$\begin{matrix}{Y^{\prime} = {{E_{G}(Y)} = {Y - \frac{\left( {Y - {{{Hc}(Y)} \cdot {norm}}} \right)}{A}}}} & {{equation}\mspace{14mu}(4)}\end{matrix}$

-   -   norm: normalization parameter, such that

${norm} = \frac{binMaxOut}{{Hc}({DyMax})}$

-   -   A: smoothing parameter, for example A=5.

The global luminance processing operation B(Y) therefore makes itpossible to continuously process all the pixels of the digital image.

The transfer function B(Y) can be represented by the following equations(5 to 8):

$\quad\left\{ \begin{matrix}{{{B(Y)} = {binMinOut}},} & {\forall{Y \in \left\lbrack {{DyMin};{SC}} \right\rbrack}} & {{equation}\mspace{14mu}(5)} \\{{{B(Y)} = {{T_{t}(Y)} = {T_{m}\left( {Y\text{-}{SC}} \right)}}},} & {\forall{Y \in \left\lbrack {{SC},{binMidOut}} \right\rbrack}} & {{equation}\mspace{14mu}(6)} \\{{{B(Y)} = {{E_{L}(Y)} = {{E_{G}(Y)} - {E_{G}({binMidOut})} + {P\; 1}}}},} & {\forall{Y \in \left\lbrack {{binMidOut};{binMaxOut}} \right\rbrack}} & {{equation}\mspace{14mu}(7)} \\{{{B(Y)} = \frac{{\left( {{DyMax} - {P\; 2}} \right) \cdot Y} + {{DyMax} \cdot \left( {{P\; 2} - {binMaxOut}} \right)}}{{DyMax} - {binMaxOut}}},} & {\forall{Y \in \left\lbrack {{binMaxOut};{DyMax}} \right\rbrack}} & {{equation}\mspace{14mu}(8)}\end{matrix} \right.$

-   -   SC: cut-off threshold, for example equal to 2;    -   T_(m)(Y): the modified gamma transfer function;    -   T_(t)(Y): the gamma transfer function T_(t)(Y) corresponding to        the first luminance processing operation S21;    -   E_(L)(Y): the smoothed equalization transfer function        corresponding to the second luminance processing operation S22;    -   P1: value of T_(t)(binMidOut), that is        P1=T _(m)(binMidOut−Sc); and    -   P2: value of E_(L)(binMaxOut), that is        P2=E _(G)(binMaxOut)−E _(G)(binMidOut)+P1.

It will be noted that the global luminance processing operation B(Y) iscontinuous over the dynamic range of the image Dy.

Furthermore, the limit values of the global luminance processingoperation B(Y) can be clipped so that the resultant values from theglobal luminance processing operation B(Y) remain contained within therange Dy of the luminance dynamic range of the image. That is to say:

-   -   if B(Y)>DyMax, then B(Y)=DyMax; and    -   if B(Y)<DyMin, then B(Y)=DyMin.

Moreover, a cut-off threshold SC is determined which is contained withinthe range [DyMin;binMidOut], and below which it is considered that theimage is noise-affected. This processing operation is used to filter thenoises in the very dark area of the image.

Furthermore, for the pixels that have luminances greater than or equalto the maximum threshold binMaxOut, a linear processing operation isused in the very light area of the image. This linear processingoperation makes it possible, in particular when using a sampledhistogram, to preserve the values of the pixels of the image that arecontained within the range [BinMaxOut;DyMax].

FIG. 3 diagrammatically represents an exemplary implementation of aglobal luminance processing operation B(Y), as applied to both sets ofpixels of a particular digital image I_(o) so as to obtain an imageI_(B).

This FIG. 3 also shows, by way of comparison, two other images I_(E),I_(G) obtained, for the first I_(E), from a non-smoothed conventionalequalization transfer function E_(c)(Y) applied to all the pixels of theoriginal image I_(o) and, for the second I_(G), from a conventionalgamma transfer function T_(c)(Y) applied to all the pixels of theoriginal image I_(o).

The original digital image I_(o) comprises four areas of pixels Z1 to Z4and an associated histogram H_(o)(Y) which represents the distributionof the number of pixels N of said image I_(o) according to theirluminance Y.

In this example, the first area Z1 comprises 30 pixels having aluminance equal to 235, the second area Z2 comprises 10 pixels having aluminance equal to 0, the third area Z3 comprises 30 pixels having aluminance equal to 255 and the fourth area Z4 comprises 10 pixels havinga luminance equal to 20.

The non-smoothed conventional equalization transfer function E_(c)(Y)applied to the entire luminance dynamic range Dy=[0; 255] of theoriginal image I_(o) is determined by the following equation (9):

$\begin{matrix}{Y^{\prime} = {{E_{c}(Y)} = {{\left( {{DyMax} - {DyMin}} \right) \cdot \frac{{\sum\limits_{u = {DyMin}}^{Y}{H_{0}(u)}} - {H_{0}({DyMin})}}{{Npixels} - {H_{0}({DyMin})}}} + {DyMin}}}} & {{equation}\mspace{14mu}(9)}\end{matrix}$

-   -   Y: the luminance of a pixel of the original image I_(o);    -   Y′: the luminance of said pixel after processing;    -   H₀: the histogram associated with the original digital image;    -   DyMin: the minimum value of the luminance dynamic range of the        image, that is to say DyMin=0;    -   DyMax: the maximum value of the luminance dynamic range of the        image, that is to say DyMax=255; and    -   Npixels: the total number of pixels of the image, that is to say        Npixels=80.

This transfer function E_(c)(Y) applied to the original image I_(o)gives the first image I_(E), denoted equalized image, and its associatedhistogram H_(E)(Y). This equalized image I_(E) comprises four areas ofpixels Z_(E) 1 to Z_(E) 4. The first area Z_(E) 1 comprises 30 pixelshaving a luminance equal to 145, the second area Z_(E) 2 comprises 10pixels having a luminance equal to 0, the third area Z_(E) 3 comprises30 pixels having a luminance equal to 255 and the fourth area Z_(E) 4comprises 10 pixels having a luminance equal to 36. This methodincreases the contrast of the light areas Z1 and Z3 of the originalimage I_(o), but does not sufficiently lighten the dark areas Z2 and Z4.

The conventional gamma transfer function T_(c)(Y), with γ=0.55, isapplied to the entire luminance dynamic range of the original imageDy=[0;255]. This conventional gamma transfer function T_(c)(Y) isexpressed by the equation (1) described previously with FIG. 2. Thisconventional gamma transfer function T_(c)(Y) applied to the originalimage I_(o) gives the second image I_(G), called increased image, andits associated histogram H_(G)(Y). This increased image I_(G) comprisesfour areas of pixels Z_(G) 1 to Z_(G) 4. The first area Z_(G) 1comprises 30 pixels having a luminance equal to 243, the second areaZ_(G) 2 comprises 10 pixels having a luminance equal to 0, the thirdarea Z_(G) 3 comprises 30 pixels having a luminance equal to 255 and thefourth area Z_(G) 4 comprises 10 pixels having a luminance equal to 62.This method increases the luminance of the dark areas but reduces thecontrast in the light areas, that is to say that it causes the“whiteout” phenomenon.

The transfer function B(Y) as described with the previous FIG. 2 is alsoapplied to the entire luminance dynamic range of the original imageDy=[0;255]. The transfer function B(Y) is represented here by theprevious equations (5 to 8) with the following parameters:

-   -   DyMin=0;    -   DyMax=255;    -   SC=2;    -   binMinOut=0;    -   binMidOut=20;    -   binMaxOut=250;    -   γ=0.55    -   A=1.

This transfer function B(Y) applied to the original image I_(o) givesthe third image I_(B), denoted lightened image, and its associatedhistogram H_(B)(Y). This lightened image I_(B) comprises four areas ofpixels Z_(B) 1 to Z_(B) 4.

For the first area Z_(B) 1, the luminance of the first area Z1 of theoriginal image being equal to 235, the equation (7) is applied such thatB(235)=E_(L)(235)=E_(G)(235)−E_(G)(20)+P1=156−62+56=150.

For the second area Z_(B) 2, the luminance of the second area Z2 of theoriginal image being equal to 0, the equation (5) is applied such thatB(0)=binMinOut=0.

For the third area Z_(B) 3, the luminance of the third area Z3 of theoriginal image being equal to 255, the equation (8) is applied such that

${B(255)} = {\frac{{\left( {255 - {P\; 2}} \right) \cdot 255} + {255 \cdot \left( {{P\; 2} - 250} \right)}}{255 - 250} = 255.}$

For the third area Z_(B) 4, the luminance of the fourth area Z4 of theoriginal image being equal to 20, the equation (6) is applied such thatB(20)=T_(m)(18)=56.

In conclusion, the first area Z_(B) 1 comprises 30 pixels having aluminance equal to 150, the second area Z_(B) 2 comprises 10 pixelshaving a luminance equal to 0, the third area Z_(B) 3 comprises 30pixels having a luminance equal to 255 and the fourth area Z_(B) 4comprises 10 pixels having a luminance equal to 56. This transferfunction B(Y) therefore increases the luminance of the dark areas of theimage while preserving the contrast of the original image I_(o).

The result of this is therefore an improvement compared to the imagesI_(E) and I_(G).

FIG. 4 diagrammatically represents another implementation of the methodof processing a digital image.

The computation step S1 can comprise a step S10 for computing an initialhistogram Hi(Y), a step S11 for determining a luminance range Li and astep S12 for redistributing the number of pixels of the image.

Advantageously, it is also possible to compute a sampled initialhistogram of the image in the same way as that used to compute thesampled histogram described with FIG. 1.

In the computation step S10, the initial histogram Hi(Y) of thedistribution of the number of pixels N of the image is computedaccording to their luminance Y over the luminance dynamic range of theimage Dy=[DyMin;DyMax].

Then, in the determination step S11, the luminance rangeLi=[binMinIn;binMaxIn], above and below which the initial histogramHi(Y) is nil, is determined, within the range Dy.

There is then performed the step S13 for redistributing the number ofpixels of the luminance range Li in the range contained between said lowthreshold binMinOut and said maximum threshold binMaxOut so as tocompute said histogram H(Y).

It is possible, for example, to use a redistribution transfer functionR(Y) according to the following equation (10):

$\begin{matrix}{{Y^{\prime} = {{R(Y)} = {{\frac{{DyMax} - {DyMin}}{{binMaxIn} - {binMinIn}} \cdot \left( {Y - {binMinIn}} \right)} + {DyMin}}}}\mspace{79mu}{\forall{Y \in \left\lbrack {{binMinIn};{binMaxIn}} \right\rbrack}}} & {{equation}\mspace{14mu}(10)}\end{matrix}$

This transfer function R(Y) makes it possible to redistribute the pixelsuniformly over the entire extent of the dynamic range of the image Dy.

In this case, said high threshold binMidOut will preferably be computedaccording to the following equation (11):

$\begin{matrix}{{binMidOut} = {{\frac{{DyMax} - {DyMin}}{{binMaxIn} - {binMinIn}} \cdot \left( {{binMidIn} - {binMinIn}} \right)} + {binMinOut}}} & {{equation}\mspace{14mu}(11)}\end{matrix}$

It is also possible to choose not to use the entire dynamic range of theimage and to redistribute differently the very dark pixels contained ina first dark area Zs relative to the pixels contained in a second lessdark area Zc.

A luminance limit is then determined between the two areas Zs, Zc by aninitial threshold binMidIn that is contained within the range [10;80]εDy. Preferably, said initial threshold binMidIn is equal to 20.

To perform two different redistributions according to the areas of theimage Zs, Zc, in the step S11 for determining the luminance range Li,the first area Zs=[binMinIn; binMidIn] is determined S111 and the secondarea Zc=[binMidIn; binMaxIn] is determined S112.

Then, in the step S12 for redistributing the number of pixels of theimage, a first step S121 for redistributing the number of pixels of thefirst area Zs within the range contained between said low thresholdbinMinOut and said high threshold binMidOut is performed, and a secondstep S122 for redistributing the number of pixels of the second area Zcin the range contained between said high threshold binMidOut and saidmaximum threshold binMaxOut is performed so as to compute said histogramH(Y).

It is possible, for example, to use a first redistribution transferfunction R1(Y) according to the following equation (12):Y′=R1(Y)=β·(Y−binMinIn)+binMinOut∀Yε[binMinIn;binMidIn]  equation (12)

-   -   β: the amplification factor of the first set of pixels E1, such        that

$\beta = {\frac{{binMidOut} - {DyMin}}{{binMidIn} - {binMinIn}}.}$

For example, it is possible to use a second redistribution transferfunction R2(Y) according to the following equation (13):

$\begin{matrix}{{{Y^{\prime}R\; 2(Y)} = {{\frac{{DyMax} - {binMidOut}}{{binMaxIn} - {binMidIn}} \cdot \left( {Y - {binMidIn}} \right)} + {binMidOut}}}\mspace{79mu}{\forall{Y \in \left\lbrack {{binMidIn};{binMaxIn}} \right\rbrack}}} & {{equation}\mspace{14mu}(13)}\end{matrix}$

As a variant, the step S11 for determining a luminance range Li cancomprise a step for determining a third area Zn contained within saidluminance range Li. This third area Zn corresponds to an area in whichthe initial histogram Hi(Y) is nil; it comprises a bottom limitbinZeroMin and a top limit binZeroMax.

The first step S111 for redistributing the number of pixels containedwithin the range [binMinIn,binZeroMin] in the range between said lowthreshold binMinOut and said high threshold binMidOut is then performed,and the second step S112 for redistributing the number of pixelscontained within the range [binZeroMax;binMaxIn] in the range betweensaid high threshold binMidOut and said maximum threshold binMaxOut isperformed so as to compute said histogram H(Y).

In this variant, said high threshold binMidOut will preferably becomputed according to the following equation (14):

$\begin{matrix}{{binMidOut} = {{\frac{{DyMax} - {DyMin}}{{binMaxIn} - {binMinIn}} \cdot \left( {{binZeroMin} - {binMinIn}} \right)} + {\alpha \cdot \left( {{binZeroMax} - {binZeroMin}} \right)} + {binMinOut}}} & {{equation}\mspace{14mu}(14)}\end{matrix}$

-   -   α: constant parameter, for example equal to 0.5.

Finally, regardless of the redistribution step that is used, the toplimit binMaxOut of the range of the second set of pixels E2 must not beless than the top limit binMaxIn of the luminance range Li of theinitial histogram Hi(Y), in order to avoid darkening the image.

FIG. 5 diagrammatically shows another implementation of the method ofprocessing a digital image. The figure includes certain steps describedin the preceding figures.

The method can comprise a detection step S3 for detecting anunderexposure of the image. The use of this detection step S3 makes itpossible to decide whether or not to perform the next step S2 forlightening the image.

During this detection step S3, two tests are carried out.

A first test to estimate the proportion of pixels that have a darkluminance based on the computed histogram H(Y). This first test includesthe computation of a first darkening criterion Sum_A according to thefollowing equation (15):

$\begin{matrix}{{Sum\_ A} = {\sum\limits_{Y = {DyMin}}^{Ygrey}{H(Y)}}} & {{equation}\mspace{14mu}(15)}\end{matrix}$

-   -   Ygrey: luminance value contained in the range Dy, for example,        Ygrey=100.

If the first darkening criterion Sum_A is greater than a threshold τdetermined according to a percentage of the size of the image, forexample ¾ of the size of the image, the lightening step S2 is carriedout.

A second test can also be performed to estimate the proportion of pixelsthat have a dark luminance based on the computed histogram H(Y). Thissecond test comprises the computation of second and third darkeningcriteria Sum_B and Sum_C according to the following equations (16) and(17):

$\begin{matrix}{{Sum\_ B} = {\sum\limits_{Y = {DyMin}}^{Yblack}{H(Y)}}} & {{equation}\mspace{14mu}(16)} \\{{Sum\_ C} = {\sum\limits_{Y = {{Yblack} + 1}}^{Ygrey}{H(Y)}}} & {{equation}\mspace{14mu}(17)}\end{matrix}$

-   -   Yblack: luminance value contained in the range Dy, such that        Yblack<Ygrey, for example, Yblack=50.

Furthermore, the third darkening criterion makes it possible to computethe equation of a straight line D1 according to the second darkeningcriterion according to the following equation (18):y=θ·Sum_(—) B+ρ  equation (18)

-   -   θ: constant parameter equal to 1.21; and    -   ρ: constant parameter equal to −1380.

In this case, if the first darkening criterion Sum_A is greater than orequal to said determined threshold τ and if the third darkeningcriterion Sum_C is less than or equal to the straight line D1, that isto say, if Sum_C≦θ Sum_B+ρ, the next lightening step S2 is carried outand the method is stopped otherwise.

The image processing method can also include a step S4 for enhancingsome of the colours of the image. In this step of colour enhancement,the chrominance of each pixel of the image is increased according to aratio between the lightened luminance and the original luminance of saidpixel of the image.

It is possible, for example, to modify the chrominance of the pixels ofthe original image according to the following equations (19) and (20):

$\begin{matrix}{U^{\prime} = {\frac{Y^{\prime}}{Y} \cdot \left( {\left( {U - 128} \right) + 128} \right)}} & {{equation}\mspace{14mu}(19)} \\{V^{\prime} = {\frac{Y^{\prime}}{Y} \cdot \left( {\left( {V - 128} \right) + 128} \right)}} & {{equation}\mspace{14mu}(20)}\end{matrix}$

-   -   U: blue chrominance of a pixel of the original image    -   U′: blue chrominance of the pixel after modification    -   V: red chrominance of a pixel of the original image    -   V′: red chrominance of the pixel after modification

The method of processing a digital image described in the precedingfigures can also be applied to a plurality of successive digital imagesof a video sequence, wherein the computation step S1 and the lighteningstep S2 are carried out on each digital image.

In this method, said initial threshold binMidin has a constant value,preferably equal to 20, for each processing operation on said successivedigital images.

It is also possible to improve the processing of the video sequence byapplying a time filter B_(v)(Y,t) to said video sequence. The aim ofthis time filter B_(v)(Y,t) is to smooth the global luminance processingoperation B(Y) so that the global luminance processing operation B(Y,t)applied to an image of the sequence at the time t is not too differentfrom the global luminance processing operation B(Y,t−1) applied to thepreceding image of the sequence, that is to say at the preceding timet−1.

For example, it is possible to apply the time filter B_(v)(Y,t) which isexpressed by the following equation (21):

$\begin{matrix}{{B_{v}\left( {Y,t} \right)} = \frac{{\left( {{FAC\_ LISS} - 1} \right) \cdot {B\left( {Y,{t - 1}} \right)}} + {B\left( {y,t} \right)}}{FAC\_ LISS}} & {{equation}\mspace{14mu}(21)}\end{matrix}$

-   -   t: the current time;    -   t−1: the preceding time; and    -   FAC_LISS: smoothing factor, for example equal to 16.

FIG. 6 diagrammatically shows a digital image processing device 1 thatis able to implement the method described in the preceding figures.

This digital image processing device 1 comprises a computation means 2for computing a histogram of the distribution of the number of pixels ofthe image as a function of their luminance, a lightening means 3 forlightening the image based on said histogram.

This lightening means 3 comprises a subdivision means 4 for subdividingthe pixels of the image into a first set of pixels having luminancevalues between a low threshold and a high threshold and into a secondset of pixels having luminance values between said high threshold and amaximum threshold.

The lightening means 3 further comprises a first luminance processingmeans 5 for performing a first luminance processing operation on thepixels of the first set of pixels and a second luminance processingmeans 6 for performing a second luminance processing operation on thepixels of the second set of pixels, the two luminance processingoperations being different, the first processing operation comprising anincrease in the luminance of the pixels of the image.

This device 1 can also comprise a means 7 for enhancing some of thecolours of the image to increase the chrominance of each pixel of theimage according to a ratio between the lightened luminance and theoriginal luminance of said pixel of the image.

All these means can be produced as software, or also in the form oflogic circuits, and can be embedded in a computer or in amicroprocessor.

FIG. 7 diagrammatically shows a wireless communication appliance 40including a digital image capture appliance 41.

The wireless communication appliance 40 comprises a casing 42 and anantenna 43 for sending/receiving digital data. Such a wirelesscommunication appliance can be, for example, a mobile telephone.

The digital image capture appliance 41 is able to capture images Piand/or videos Vi.

This digital image capture appliance 41 comprises a digital imageprocessing device 1.

The invention claimed is:
 1. A computer-implemented method of processinga digital image, said image comprising a plurality of pixels, the methodcomprising: computing a histogram of a distribution of the number ofpixels of the image as a function of their luminance; subdividing thepixels of the image into a first set of pixels having luminance valuesbetween a low threshold and a high threshold, and into a second set ofpixels having luminance values greater than the high threshold;performing a first luminance processing operation on the first set ofpixels that comprises increasing the luminance of the first set ofpixels; and performing a different second luminance processing operationon the second set of pixels; wherein the method is implemented by acomputer.
 2. The computer-implemented method of claim 1, wherein thefirst luminance processing operation further comprises a gamma-typetransfer function processing operation having an adaptable gammaparameter that is applied to the first set of pixels.
 3. Thecomputer-implemented method of claim 1, wherein the second luminanceprocessing operation comprises an equalization of the histogram appliedto the second set of pixels.
 4. The computer-implemented method of claim1, wherein the second set of pixels have luminance values between thehigh threshold and a maximum threshold, and wherein said computing ahistogram comprises: computing an initial histogram; determining aluminance range above and below which the values of the initialhistogram are nil; and redistributing the pixels in the luminance rangebetween said low threshold and said maximum threshold so as to computesaid histogram.
 5. The computer-implemented method of claim 4, furthercomprising: wherein determining a luminance range above and below whichthe values of the initial histogram are nil comprises: determining afirst area between the bottom limit of the luminance range and aninitial threshold; and determining a second area between said initialthreshold and the top limit of the luminance range; and whereinredistributing the pixels in the luminance range between said lowthreshold and said maximum threshold comprises: performing a firstredistribution of the pixels in the first area in the range between thelow threshold and the high threshold; and performing a secondredistribution of the pixels in the second area in the range between thehigh threshold and the maximum threshold so as to compute saidhistogram.
 6. The computer-implemented method of claim 1, furthercomprising: enhancing some of the colors of the image by amplifying thechrominance of each pixel of the image according to a ratio between thelightened luminance and the original luminance of said pixel of theimage.
 7. The computer-implemented method of claim 1, wherein the methodis repeatedly performed to process a plurality of successive digitalimages of a video sequence, and wherein said high threshold has aconstant value for each processing operation on the successive digitalimages.
 8. A device for processing and lightening a digital imagecomprising a plurality of pixels, the device comprising at least onelogic circuit or a microprocessor that is configured to: compute ahistogram of the distribution of the number of pixels of the image as afunction of their luminance; subdivide the pixels of the image into afirst set of pixels having luminance values between a low threshold anda high threshold and into a second set of pixels having luminance valuesgreater than the high threshold; perform a first luminance processingoperation on the pixels of the first set of pixels, the first processingoperation comprising an increase in the luminance of the pixels of thefirst set; and perform a different second luminance processing operationon the pixels of the second set of pixels.
 9. The device of claim 8,wherein the first luminance processing operation comprises a gamma-typetransfer function processing operation having an adaptable gammaparameter applied to the first set of pixels.
 10. The device of claim 8,wherein the second luminance processing operation comprises anequalization of the histogram applied to the second set of pixels. 11.The device of claim 8, wherein the second set of pixels have luminancevalues between the high threshold and a maximum threshold, and whereinto compute the histogram, the at least one logic circuit ormicroprocessor is configured to: compute an initial histogram; determinea luminance range above and below which the values of the initialhistogram are nil; and redistribute the pixels in the luminance rangebetween said low threshold and said maximum threshold so as to computesaid histogram.
 12. The device of claim 11, further comprising: whereinto determine the luminance range above and below which the values of theinitial histogram are nil, the at least one logic circuit ormicroprocessor is configured to: determine a first area between thebottom limit of the luminance range and an initial threshold; anddetermine a second area between said initial threshold and the top limitof the luminance range; and wherein to redistribute the pixels in theluminance range between said low threshold and said maximum threshold,the at least one logic circuit or microprocessor is configured to:perform a first redistribution of the pixels of the first area in therange between the low threshold and the high threshold; and perform asecond redistribution of the number of pixels of the second area in therange between the high threshold and the maximum threshold so as tocompute said histogram.
 13. The device of claim 8, wherein the at leastone logic circuit or microprocessor is further configured to: enhancesome of the colors of the image to amplify the chrominance of each pixelof the image according to a ratio between the lightened luminance andthe original luminance of said pixel of the image.
 14. The device ofclaim 8, wherein the at least one logic circuit or microprocessor isfurther configured to process and lighten a plurality of successivedigital images of a video sequence, wherein each of the plurality ofsuccessive digital images has a constant high threshold value.
 15. Awireless communication appliance comprising a digital image processingdevice for processing and lightening a digital image comprising aplurality of pixels, the device including at least one logic circuit ora microprocessor that is configured to: compute a histogram of thedistribution of the number of pixels of the image as a function of theirluminance; subdivide the pixels of the image into a first set of pixelshaving luminance values between a low threshold and a high threshold andinto a second set of pixels having luminance values greater than thehigh threshold; perform a first luminance processing operation on thepixels of the first set of pixels, the first processing operationcomprising an increase in the luminance of the pixels of the first set;and perform a different second luminance processing operation on thepixels of the second set of pixels.
 16. A computer-implemented method ofprocessing a digital image, said image comprising a plurality of pixels,the method comprising: computing a histogram of a distribution of thenumber of pixels of the image as a function of their luminance;subdividing the pixels of the image into a first set of pixels havingluminance values between a low threshold and a high threshold, and intoa second set of pixels having luminance values greater than the highthreshold; performing a first luminance processing operation on thefirst set of pixels, the first luminance processing operation comprisinga gamma-type transfer function processing operation having an adaptablegamma parameter applied to the first set of pixels for increasing theluminance of the first set of pixels; and performing a different, secondluminance processing operation on the second set of pixels, the secondluminance processing operation comprising an equalization of thehistogram applied to the second set of pixels; wherein the method isimplemented by a computer.
 17. The computer-implemented method of claim16, wherein the pixels of the second set have luminance values betweenthe high threshold and a maximum threshold, and wherein said computing ahistogram comprises: computing an initial histogram; determining aluminance range above and below which the values of the initialhistogram are nil; and redistributing the pixels in the luminance rangebetween said low threshold and said maximum threshold so as to computesaid histogram.
 18. The computer-implemented method of claim 17, furthercomprising: wherein determining a luminance range above and below whichthe values of the initial histogram are nil comprises: determining afirst area between the bottom limit of the luminance range and aninitial threshold; and determining a second area between said initialthreshold and the top limit of the luminance range; whereinredistributing the pixels in the luminance range between said lowthreshold and said maximum threshold comprises: performing a firstredistribution of the pixels in the first area in the range between thelow threshold and the high threshold; and performing a secondredistribution of the pixels in the second area in the range between thehigh threshold and the maximum threshold so as to compute saidhistogram.
 19. The method of claim 16, further comprising: enhancingsome of the colors of the image by amplifying the chrominance of eachpixel of the image according to a ratio between the lightened luminanceand the original luminance of said pixel of the image.
 20. The method ofclaim 16, wherein the method is repeatedly performed to process aplurality of successive digital images of a video sequence, and whereinsaid high threshold has a constant value for each processing operationon the successive digital images.
 21. A device for processing andlightening a digital image comprising a plurality of pixels, the devicecomprising at least one logic circuit or a microprocessor that isconfigured to: compute a histogram of the distribution of the number ofpixels of the image as a function of their luminance; subdivide thepixels of the image into a first set of pixels having luminance valuesbetween a low threshold and a high threshold and into a second set ofpixels having luminance values greater than the high threshold; performa first luminance processing operation on the first set of pixels, thefirst luminance processing operating comprising a gamma-type transferfunction processing operation having an adaptable gamma parameterapplied to the first set of pixels for increasing the luminance of thefirst set of pixels; and perform a different, second luminanceprocessing operation on the second set of pixels, the second luminanceprocessing operation comprising an equalization of the histogram appliedto the second set of pixels.
 22. The device of claim 21, wherein thesecond set of pixels have luminance values between the high thresholdand a maximum threshold, and wherein to compute the histogram, the atleast one logic circuit or microprocessor is configured to: compute aninitial histogram; determine a luminance range above and below which thevalues of the initial histogram are nil; and redistribute the pixels inthe luminance range between said low threshold and said maximumthreshold so as to compute said histogram.
 23. The device of claim 22,further comprising: wherein to determine the luminance range above andbelow which the values of the initial histogram are nil, the at leastone logic circuit or microprocessor is configured to: determine a firstarea between the bottom limit of the luminance range and an initialthreshold; and determine a second area between said initial thresholdand the top limit of the luminance range; and wherein to redistributethe pixels in the luminance range between said low threshold and saidmaximum threshold, the at least one logic circuit or microprocessor isconfigured to: perform a first redistribution of the pixels of the firstarea in the range between said low threshold and said high threshold;and perform a second redistribution of the number of pixels of thesecond area in the range between said high threshold and the maximumthreshold so as to compute said histogram.
 24. The device of claim 21,wherein the at least one logic circuit or microprocessor is furtherconfigured to: enhance some of the colors of the image to amplify thechrominance of each pixel of the image according to a ratio between thelightened luminance and the original luminance of said pixel of theimage.
 25. The device of claim 21, wherein the at least one logiccircuit or microprocessor is further configured to process and lighten aplurality of successive digital images of a video sequence, wherein eachof the plurality of successive digital images has a constant highthreshold value.
 26. A wireless communication appliance comprising adigital image processing device for processing and lightening a digitalimage comprising a plurality of pixels, the device including at leastone logic circuit or a microprocessor that is configured to: compute ahistogram of the distribution of the number of pixels of the image as afunction of their luminance; subdivide the pixels of the image into afirst set of pixels having luminance values between a low threshold anda high threshold and into a second set of pixels having luminance valuesgreater than the high threshold; perform a first luminance processingoperation on the first set of pixels, the first luminance processingoperating comprising a gamma-type transfer function processing operationhaving an adaptable gamma parameter applied to the first set of pixelsfor increasing the luminance of the first set of pixels; and perform adifferent, second luminance processing operation on the second set ofpixels, the second luminance processing operation comprising anequalization of the histogram applied to the second set of pixels.